package com.powernode.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.powernode.domain.PickAddr;
import com.powernode.mapper.PickAddrMapper;
import com.powernode.service.PickAddrService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author 贺
* @description 针对表【pick_addr(用户配送地址)】的数据库操作Service实现
* @createDate 2024-07-19 13:40:40
*/
@Service
public class PickAddrServiceImpl extends ServiceImpl<PickAddrMapper, PickAddr>
    implements PickAddrService{

    @Resource
    private PickAddrMapper pickAddrMapper;

    /**
     * 新增自提点
     * @param pickAddr
     * @return
     */
    @Override
    public Boolean savePickAddr(PickAddr pickAddr) {
        // 补充自提点对象属性
        pickAddr.setShopId(1L);
        return pickAddrMapper.insert(pickAddr) > 0;
    }
}




